Optimal. Leaf size=34 \[ -\frac {(a-b) \log (\sin (e+f x))}{f}-\frac {a \cot ^2(e+f x)}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3629, 12, 3475} \[ -\frac {(a-b) \log (\sin (e+f x))}{f}-\frac {a \cot ^2(e+f x)}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 3475
Rule 3629
Rubi steps
\begin {align*} \int \cot ^3(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx &=-\frac {a \cot ^2(e+f x)}{2 f}-\int (a-b) \cot (e+f x) \, dx\\ &=-\frac {a \cot ^2(e+f x)}{2 f}-(a-b) \int \cot (e+f x) \, dx\\ &=-\frac {a \cot ^2(e+f x)}{2 f}-\frac {(a-b) \log (\sin (e+f x))}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.16, size = 56, normalized size = 1.65 \[ \frac {b (\log (\tan (e+f x))+\log (\cos (e+f x)))}{f}-\frac {a \left (\cot ^2(e+f x)+2 \log (\tan (e+f x))+2 \log (\cos (e+f x))\right )}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 61, normalized size = 1.79 \[ -\frac {{\left (a - b\right )} \log \left (\frac {\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{2} + a \tan \left (f x + e\right )^{2} + a}{2 \, f \tan \left (f x + e\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.66, size = 41, normalized size = 1.21 \[ \frac {b \ln \left (\sin \left (f x +e \right )\right )}{f}-\frac {a \left (\cot ^{2}\left (f x +e \right )\right )}{2 f}-\frac {a \ln \left (\sin \left (f x +e \right )\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 31, normalized size = 0.91 \[ -\frac {{\left (a - b\right )} \log \left (\sin \left (f x + e\right )^{2}\right ) + \frac {a}{\sin \left (f x + e\right )^{2}}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.62, size = 54, normalized size = 1.59 \[ \frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )\,\left (\frac {a}{2}-\frac {b}{2}\right )}{f}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a-b\right )}{f}-\frac {a\,{\mathrm {cot}\left (e+f\,x\right )}^2}{2\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.29, size = 97, normalized size = 2.85 \[ \begin {cases} \tilde {\infty } a x & \text {for}\: e = 0 \wedge f = 0 \\x \left (a + b \tan ^{2}{\relax (e )}\right ) \cot ^{3}{\relax (e )} & \text {for}\: f = 0 \\\tilde {\infty } a x & \text {for}\: e = - f x \\\frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} - \frac {a \log {\left (\tan {\left (e + f x \right )} \right )}}{f} - \frac {a}{2 f \tan ^{2}{\left (e + f x \right )}} - \frac {b \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {b \log {\left (\tan {\left (e + f x \right )} \right )}}{f} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________